import Env from './env';

let config = {
    // note these config should be pure value, not instances.
    env: Env,
    auth: {
        /**
         * type-> 以什么方式保存认证信息，需要与后台协调一致：
         *     - token： 使用一个Header (default)
         *     - cookie：使用内建的sessionId
         *     - tookie: 创建一个特殊的cookie用来存储token
         */
        type: 'token',
        /**
         * key name of the key-value-pair of the auth. Default to 'X-Auth-Token'
         */
        keyName: 'X-Auth-Token',
        /**
         * where to redirect when not login. It can be a url or a component name.
         * If it is a url, it must be absulote path with schema.
         */
        loginUrl: 'http://localhost:34567/login',
        /**
         * where to receive the auth. It should be a valid path.
         * After receiving the auth, route will be redirected to the (predefined/specified) place.
         * the format is `{host}/{keyStorePath}?token=...&service=...`
         */
        keyStorePath: '/keystore',
    },

    /**
     * 后台数据接口的地址
     */
    dataUrl: 'http://localhost:34567',
};
export default config;